IF   (OSGLEAP_BUILD_SHARED_LIBS)
    ADD_DEFINITIONS(-DOSGLEAP_LIBRARY)
ELSE (DYNAMIC_OPENSCENEGRAPH)
    ADD_DEFINITIONS(-DOSGLEAP_LIBRARY_STATIC)
ENDIF(OSGLEAP_BUILD_SHARED_LIBS)

FIND_PACKAGE(osg)
FIND_PACKAGE(osgGA)
FIND_PACKAGE(OpenThreads)
FIND_PACKAGE(LeapSDK)

SET(LIB_NAME osgLeap)

SET(HEADER_PATH ${CMAKE_SOURCE_DIR}/include/${LIB_NAME})

INCLUDE_DIRECTORIES(${LEAP_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIR})

SET(TARGET_H
    ${HEADER_PATH}/Controller
    ${HEADER_PATH}/Export
	${HEADER_PATH}/LeapManipulator
	${HEADER_PATH}/Listener
)

SET(TARGET_SRC
	Controller.cpp
    LeapManipulator.cpp
)

SET(TARGET_LIBRARIES_VARS
    LEAP_LIBRARY
	OSG_LIBRARY
	OSGGA_LIBRARY
	OPENTHREADS_LIBRARY
)

SETUP_LIBRARY(${LIB_NAME})
